module('MapManager',package.seeall)

function loadMap(mapName)

	local tiledMap = CCTMXTiledMap:create(mapName)
	local scene = CCScene:create()
	scene:addChild(tiledMap)
	
	local transition = CCTransitionProgressHorizontal:create(1.2,scene)
		
	CCDirector:sharedDirector():replaceScene(transition)
	
end

function showLogin(mapName)

	local sprite = CCSprite:create(mapName)
	sprite:setScaleX(0.8921933)
	sprite:setScaleY(0.8579)
	
	
	local s = CCScene:create()
	s:setPosition(CCPointMake(240,160))
	s:addChild(sprite)
	CCDirector:sharedDirector():runWithScene(s)
	
	--加载UI布局
	login.showPanel(s)
end